//
//  BuscadorViewController.h
//  FinApp
//
//  Created by Marcel Arbó Lack on 11/11/11.
//  Copyright (c) 2011 FIB-Fàcultat d'informàtica de Barcelona. All rights reserved.
//

/**
 * BuscadorViewController
 *
 * Vista per buscar inmobles segons uns parametres de cerca
 *
 */

#import <UIKit/UIKit.h>
#import "RestConsumer.h"


@interface BuscadorViewController : UIViewController <UIPickerViewDelegate, UIPickerViewDataSource,DataFetchingHandler> {
    UISegmentedControl  *segmentedControl;
    UINavigationBar     *navigationBar;
    
    UIView          *pickerView;
    UIBarButtonItem *okButton;
    UIPickerView    *picker;
    
    UIView      *buttonsView;
    UIButton    *inmobleButton;
    UIButton    *provinciaButton;
    UIButton    *poblacioButton;
    
    UILabel     *segonaMaLabel;
    UIImageView *segonaMaImage;
    UIButton    *segonaMaButton;
    UILabel     *aEstrenarLabel;
    UIImageView *aEstrenarImage;
    UIButton    *aEstrenarButton;
    UILabel     *nomesVacacionalLabel;
    UIImageView *nomesVacacionalImage;
    UIButton    *nomesVacacionalButton;
    
    UIButton    *buscarButton;
    
    NSArray *inmobleArray;
    NSArray *provinciaArray;
    NSArray *poblacioArray;
}

@property (nonatomic, retain) UISegmentedControl        *segmentedControl;
@property (nonatomic, retain) IBOutlet UINavigationBar  *navigationBar;

@property (nonatomic, retain) IBOutlet UIView           *pickerView;
@property (nonatomic, retain) IBOutlet UIBarButtonItem  *okButton;
@property (nonatomic, retain) IBOutlet UIPickerView     *picker;

@property (nonatomic, retain) IBOutlet UIView           *buttonsView;
@property (nonatomic, retain) IBOutlet UIButton         *inmobleButton;
@property (nonatomic, retain) IBOutlet UIButton         *provinciaButton;
@property (nonatomic, retain) IBOutlet UIButton         *poblacioButton;

@property (nonatomic, retain) IBOutlet UILabel          *segonaMaLabel;
@property (nonatomic, retain) IBOutlet UIImageView      *segonaMaImage;
@property (nonatomic, retain) IBOutlet  UIButton        *segonaMaButton;
@property (nonatomic, retain) IBOutlet UILabel          *aEstrenarLabel;
@property (nonatomic, retain) IBOutlet UIImageView      *aEstrenarImage;
@property (nonatomic, retain) IBOutlet UIButton         *aEstrenarButton;
@property (nonatomic, retain) IBOutlet UILabel          *nomesVacacionalLabel;
@property (nonatomic, retain) IBOutlet UIImageView      *nomesVacacionalImage;
@property (nonatomic, retain) IBOutlet UIButton         *nomesVacacionalButton;

@property (nonatomic, retain) IBOutlet UIButton         *buscarButton;

@property (nonatomic, retain) NSArray *inmobleArray;
@property (nonatomic, retain) NSArray *provinciaArray;
@property (nonatomic, retain) NSArray *poblacioArray;

- (IBAction)showPicker:(id)sender;
- (IBAction)hidePicker:(id)sender;

- (IBAction)segonaMaButtonPressed:(id)sender;
- (IBAction)aEstrenarButtonPressed:(id)sender;
- (IBAction)nomesVacacionalButtonPressed:(id)sender;

- (IBAction)buscarButtonPressed:(id)sender;

@end
